import os

import openai

os.environ["OPENAI_API_KEY"] = "cc84cb87efef3e9903e8a30abf316b62"  # 将个人token替换到这个位置
os.environ["OPENAI_BASE_URL"] = "https://apitoken.ceba.ceshiren.com/openai/v1/"
os.environ["OPENAI_API_BASE"] = "https://apitoken.ceba.ceshiren.com/openai/v1/"


response = openai.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[{"role": "user", "content": '今天星期几'}],
    temperature=0,
    max_tokens=100,
)
print(response.choices[0].message.content)